Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return NaN from history if any of the calculations end up as NaN #55

Merged
merged 5 commits into from
Jun 26, 2024

Conversation

sdroege
Copy link
Owner

@sdroege sdroege commented Jun 3, 2024

This avoids returning non-sensical results, or in case of history-based
loudness range calculations a panic.

All filter processing already handles NaN gracefully.

Fixes #43

src/filter.rs Outdated Show resolved Hide resolved
@sdroege sdroege force-pushed the avoid-nan branch 3 times, most recently from 878680a to 873de1c Compare June 3, 2024 13:11
src/ebur128.rs Outdated Show resolved Hide resolved
src/filter.rs Outdated Show resolved Hide resolved
@wader
Copy link

wader commented Jun 17, 2024

@sdroege Thanks and sorry for late reply. Don't think i have any strong opinions how to fix it, in the software where this was triggered we're looking for NaN and Inf samples before using ebur128 as a workaround atm.

sdroege added 2 commits June 26, 2024 09:22
Using inline assembly would require 1.75 as MSRV.
This avoids returning non-sensical results, or in case of history-based
loudness range calculations a panic.

All filter processing already handles NaN gracefully.

Fixes #43
@sdroege sdroege changed the title Avoid NaN results during processing of input samples Return NaN from history if any of the calculations end up as NaN Jun 26, 2024
@sdroege sdroege merged commit 1699f8f into main Jun 26, 2024
9 checks passed
@sdroege sdroege deleted the avoid-nan branch June 26, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when calling loudness_range
2 participants